{{include file="header_inc.html"}}
<script>
	//Tab切换
	function SwapTab(name, cls_show, cls_hide, cnt, cur) {
		for (i = 1; i <= cnt; i++) {
			if (i == cur) {
				$('#div_' + name + '_' + i).show();
				$('#tab_' + name + '_' + i).attr('class', cls_show);
			} else {
				$('#div_' + name + '_' + i).hide();
				$('#tab_' + name + '_' + i).attr('class', cls_hide);
			}
		}
	}
</script>
<script type="text/javascript">
	$(function() {
		window.top.$('#display_center_id').css('display', 'none');
		$.formValidator.initConfig({
			formid : "myform",
			autotip : true,
			onerror : function(msg, obj) {
				window.top.art.dialog({
					content : msg,
					lock : true,
					width : '200',
					height : '50'
				}, function() {
					this.close();
					$(obj).focus();
				})
			}
		});

		$("#catname").formValidator({
			onshow : "请输入栏目名称",
			onfocus : "请输入栏目名称",
			oncorrect : "输入正确"
		}).inputValidator({
			min : 1,
			onerror : "请输入栏目名称"
		});

		$("#controller").formValidator({
			onshow : "请输入栏目地址",
			onfocus : "请输入栏目地址",
			oncorrect : "输入正确"
		}).inputValidator({
			min : 1,
			onerror : "请输入栏目地址"
		});
	})
</script>
<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a href='/content/category/'><em>管理栏目</em></a><span>|</span><a
				href='javascript:;' class="on"><em>编辑栏目</em></a>
		</div>
	</div>
	<form name="myform" id="myform" action="/content/category/edit/"
		method="post">
		<div class="pad-10">
			<div class="col-tab">
				<ul class="tabBut cu-li">
					<li id="tab_setting_1" class="on"
						onclick="SwapTab('setting','on','',6,1);">基本选项</li>
					<li id="tab_setting_2" onclick="SwapTab('setting','on','',6,2);">生成HTML设置</li>
					<li id="tab_setting_3" onclick="SwapTab('setting','on','',6,3);">SEO设置</li>
				</ul>
				<div id="div_setting_1" class="contentList pad-10">

					<table width="100%" class="table_form ">
						<tr>
							<th width="200">上级栏目：</th>
							<td><select name="info[parentid]" id="parentid">
									<option value='0'>≡ 作为一级栏目 ≡</option> {{$select_categorys}}
							</select></td>

						</tr>

						<tr>
							<th>栏目名称：</th>
							<td><span id="normal_add"><input type="text"
									name="info[catname]" id="catname" class="input-text"
									value="{{$Category_info.catname}}"></span></td>
						</tr>
						<tr>
							<th>栏目地址：</th>
							<td><span id="normal_add"><input type="text"
									name="info[controller]" id="controller" class="input-text"
									value="{{$Category_info.controller}}"></span></td>
						</tr>
						<tr>
							<th>描述：</th>
							<td><textarea name="info[description]" maxlength="255"
									style="width: 300px; height: 60px;">{{$Category_info.description}}</textarea></td>
						</tr>
						<tr>
							<th>是否在导航显示：</th>
							<td><input type='radio' name='info[ismenu]' value='1'
								{{if $Category_info.ismenu==1}}checked{{/if}}>
								是&nbsp;&nbsp;&nbsp;&nbsp; <input type='radio'
								name='info[ismenu]' value='0'
								{{if $Category_info.ismenu==0}}checked{{/if}}> 否</td>
						</tr>
					</table>

				</div>
				<div id="div_setting_2" class="contentList pad-10 hidden">
					<table width="100%" class="table_form ">
						<tr>

							<th width="200">栏目生成Html：</th>
							<td><input type='radio' name='setting[ishtml]' value='1'
								{{if $Category_info.setting.ishtml==1}}checked{{/if}}>
								是&nbsp;&nbsp;&nbsp;&nbsp; <input type='radio'
								name='setting[ishtml]' value='0'
								{{if $Category_info.setting.ishtml==0}}checked{{/if}}> 否</td>
						</tr>
						<tr>

							<th>内容页生成Html：</th>
							<td><input type='radio' name='setting[content_ishtml]'
								value='1'
								{{if $Category_info.setting.content_ishtml==1}}checked{{/if}}>
								是&nbsp;&nbsp;&nbsp;&nbsp; <input type='radio'
								name='setting[content_ishtml]' value='0'
								{{if $Category_info.setting.content_ishtml==0}}checked{{/if}}>
								否</td>
						</tr>
					</table>
				</div>
				<div id="div_setting_3" class="contentList pad-10 hidden">
					<table width="100%" class="table_form ">
						<tr>
							<th width="200"><strong>META Title（栏目标题）</strong><br />针对搜索引擎设置的标题</th>
							<td><input name='setting[meta_title]' type='text'
								id='meta_title' value='{{$Category_info.setting.meta_title}}'
								size='60' maxlength='60'></td>
						</tr>
						<tr>
							<th><strong>META Keywords（栏目关键词）</strong><br />关键字中间用半角逗号隔开</th>

							<td><textarea name='setting[meta_keywords]'
									id='meta_keywords' style="width: 90%; height: 40px">{{$Category_info.setting.meta_keywords}}</textarea></td>
						</tr>
						<tr>
							<th><strong>META Description（栏目描述）</strong><br />针对搜索引擎设置的网页描述</th>
							<td><textarea name='setting[meta_description]'
									id='meta_description' style="width: 90%; height: 50px">{{$Category_info.setting.meta_description}}</textarea></td>
						</tr>
					</table>
				</div>
				<div class="bk15"></div>
				<input name="id" type="hidden" value="{{$id}}"> <input
					name="dosubmit" type="submit" value="提交" class="button">
			</div>
		</div>
	</form>

</body>
{{include file="footer.html"}}
